package com.apes.enquiry.supplier.baturu.model;

import com.apes.framework.jpa.BaseModel;
import com.apes.framework.jpa.DefaultPersistListener;
import com.apes.framework.jpa.comment.Comment;
import com.apes.framework.jpa.generator.ApesGenerator;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SelectBeforeUpdate;

import javax.persistence.*;
import java.util.List;

@Getter
@Setter
@SelectBeforeUpdate
@DynamicInsert
@DynamicUpdate
@Entity
@EntityListeners(DefaultPersistListener.class)
@Table(name = BaturuInquireCarInfo.CONST_TABLE_NAME)
public class BaturuInquireCarInfo extends BaseModel {
    public static final String CONST_TABLE_NAME = "sp_buturu_inquire_car";

    @Id
    @Column(name = "id", length = 32)
    @ApesGenerator(code = CONST_TABLE_NAME, name = "巴图鲁-询价扩展车辆")
    @Comment("编号")
    private String id;

    @Comment("主表编码")
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "baturu_inquire_id", referencedColumnName = "id")
    private BaturuInquire baturuInquire;

    @Column(name = "jekun_model_code", length = 64)
    @Comment("配置车型编码")
    private String jekunModelCode;

    @Column(name = "car_model_label", length = 256)
    @Comment("配置车型名称")
    private String carModelLabel;

    @Column(name = "car_license", length = 64)
    @Comment("车牌号码")
    private String carLicense;

    @Comment("vin码")
    @Column(name = "vin_code")
    private String vinCode;

    @Comment("车品牌名称")
    @Column(name = "car_brand_name")
    private String carBrandName;

    @Comment("车系名称")
    @Column(name = "car_system_name")
    private String carSystemName;

    @Comment("铭牌图片")
    @Column(name = "nameplate_picture")
    private String nameplatePicture;

    @Comment("车头图片")
    @Column(name = "head_picture")
    private String headPicture;

    @Comment("车尾图片")
    @Column(name = "trail_picture")
    private String trailPicture;

}
